/*
 * chop.c - Chops off the last character
 */

char
chop(char *str)
{
  char ch;
  char *s;

  if (*str == '\0')
    return '\0';
  for (s=str; *s != '\0'; s++)
    ;
  ch = *(s-1);
  *(s-1) = '\0';

  return ch;
}
